package 反射进阶;

import java.lang.reflect.Method;

public class Father {
    public void show(String action) {
        try {
            final Method method = this.getClass().getDeclaredMethod(action);
            method.invoke(this);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
